package com.novoda.noplayer;

/**
 * Assume all errors are thrown by Exo Player, MEDIA_PLAYER prefix will
 * indicate that the error is thrown by Media Player.
 */
public enum DetailErrorType {

    // SOURCE,
    LIVE_STALE_MANIFEST_AND_NEW_MANIFEST_COULD_NOT_LOAD_ERROR,
    PARSING_MEDIA_DATA_OR_METADATA_ERROR,

    AD_LOAD_ERROR_THEN_WILL_SKIP,
    AD_GROUP_LOAD_ERROR_THEN_WILL_SKIP,
    ALL_ADS_LOAD_ERROR_THEN_WILL_SKIP,
    ADS_LOAD_UNEXPECTED_ERROR_THEN_WILL_SKIP,

    CLIPPING_MEDIA_SOURCE_CANNOT_CLIP_WRAPPED_SOURCE_INVALID_PERIOD_COUNT,
    CLIPPING_MEDIA_SOURCE_CANNOT_CLIP_WRAPPED_SOURCE_NOT_SEEKABLE_TO_START,
    CLIPPING_MEDIA_SOURCE_CANNOT_CLIP_WRAPPED_SOURCE_START_EXCEEDS_END,
    CLIPPING_MEDIA_SOURCE_CANNOT_CLIP_WRAPPED_SOURCE_UNKNOWN_ERROR,
    DATA_POSITION_OUT_OF_RANGE_ERROR,

    SAMPLE_QUEUE_MAPPING_ERROR,
    READING_LOCAL_FILE_ERROR,
    UNEXPECTED_LOADING_ERROR,
    DOWNLOAD_ERROR,
    MERGING_MEDIA_SOURCE_CANNOT_MERGE_ITS_SOURCES,
    TASK_CANNOT_PROCEED_PRIORITY_TOO_LOW,
    CACHE_WRITING_DATA_ERROR,
    READ_LOCAL_ASSET_ERROR,

    MEDIA_PLAYER_IO,
    MEDIA_PLAYER_MALFORMED,
    MEDIA_PLAYER_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK,
    MEDIA_PLAYER_INFO_NOT_SEEKABLE,
    MEDIA_PLAYER_SUBTITLE_TIMED_OUT,
    MEDIA_PLAYER_UNSUPPORTED_SUBTITLE,

    // CONNECTIVITY
    HTTP_CANNOT_OPEN_ERROR,
    HTTP_CANNOT_READ_ERROR,
    HTTP_CANNOT_CLOSE_ERROR,
    READ_CONTENT_URI_ERROR,
    READ_FROM_UDP_ERROR,
    HLS_PLAYLIST_STUCK_SERVER_SIDE_ERROR,
    HLS_PLAYLIST_SERVER_HAS_RESET,
    MEDIA_PLAYER_TIMED_OUT,

    // DRM
    UNSUPPORTED_DRM_SCHEME_ERROR,
    DRM_INSTANTIATION_ERROR,
    DRM_UNKNOWN_ERROR,
    CANNOT_ACQUIRE_DRM_SESSION_MISSING_SCHEME_FOR_REQUIRED_UUID_ERROR,
    DRM_SESSION_ERROR,
    DRM_KEYS_EXPIRED_ERROR,
    MEDIA_REQUIRES_DRM_SESSION_MANAGER_ERROR,
    MEDIA_PLAYER_SERVER_DIED,
    MEDIA_PLAYER_PREPARE_DRM_STATUS_PREPARATION_ERROR,
    MEDIA_PLAYER_PREPARE_DRM_STATUS_PROVISIONING_NETWORK_ERROR,
    MEDIA_PLAYER_PREPARE_DRM_STATUS_PROVISIONING_SERVER_ERROR,

    // CONTENT_DECRYPTION
    FAIL_DECRYPT_DATA_DUE_NON_PLATFORM_COMPONENT_ERROR,
    INSUFFICIENT_OUTPUT_PROTECTION_ERROR,
    KEY_EXPIRED_ERROR,
    KEY_NOT_FOUND_WHEN_DECRYPTION_ERROR,
    RESOURCE_BUSY_ERROR_THEN_SHOULD_RETRY,
    ATTEMPTED_ON_CLOSED_SEDDION_ERROR,
    LICENSE_POLICY_REQUIRED_NOT_SUPPORTED_BY_DEVICE_ERROR,

    // RENDERER_DECODER
    AUDIO_SINK_CONFIGURATION_ERROR,
    AUDIO_SINK_INITIALISATION_ERROR,
    AUDIO_SINK_WRITE_ERROR,
    AUDIO_UNHANDLED_FORMAT_ERROR,
    AUDIO_DECODER_ERROR,
    INITIALISATION_ERROR,
    DECODING_SUBTITLE_ERROR,
    MEDIA_PLAYER_INFO_AUDIO_NOT_PLAYING,
    MEDIA_PLAYER_BAD_INTERLEAVING,
    MEDIA_PLAYER_INFO_VIDEO_NOT_PLAYING,
    MEDIA_PLAYER_INFO_VIDEO_TRACK_LAGGING,
    UNEXPECTED_CODEC_ERROR,

    // UNEXPECTED
    EGL_OPERATION_ERROR,
    SPURIOUS_AUDIO_TRACK_TIMESTAMP_ERROR,
    MULTIPLE_RENDERER_MEDIA_CLOCK_ENABLED_ERROR,

    UNKNOWN,
    MEDIA_PLAYER_UNKNOWN
}
